<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/1/18 0018
 * Time: 16:12
 */


trait Lx{
    public function getMsg()
    {
        return "1";
    }
}

class father{
    public function getError()
    {
        return "2";

    }
}

class xx extends father{
    use Lx;
}

$obj = new xx();
echo $obj->getMsg();
echo $obj->getError();